<template>
  <div class="tags">
    <el-tag><i class="el-icon-discount"></i> 主 页</el-tag>
    <el-tag :key="tag" v-for="tag in dynamicTags" closable :disable-transitions="false" @close="handleClose(tag)">
      {{tag}}
    </el-tag>
  </div>
</template>

<script>
export default {
  name: '',
  data(){
    return {
      dynamicTags: ['标签一', '标签二', '标签三'],
    }
  },
  methods:{
     handleClose(tag) {
      //  console.log(tag)
        this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
      },
  }
 
}
</script>

<style lang="scss" scoped>
.tags{
  padding-bottom: 10px;
}
.el-tag{
    margin-right: 5px;
    cursor: pointer;

}
</style>
